package com.yumeko.springcloud;

import com.yumeko.myirule.MySelfRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @program: SpringCloud
 * @description:
 * @author: Zheng Hao
 * @create: 2020-03-07 05:43
 */
@SpringBootApplication
@EnableEurekaClient
@EnableDiscoveryClient
//@RibbonClient(name="CLOUD-PROVIDER-SERVICE",configuration = MySelfRule.class)
public class CloudOrderApplication8000 {
    public static void main(String[] args) {
        SpringApplication.run(CloudOrderApplication8000.class);
    }
    @Bean
    //@LoadBalanced
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
